import { request } from '@/utils'

export default {
  create: data => request.post('/system/manager/create', data),
  read: (params = {}) => request.get('/system/manager/index', { params }),
  update: data => request.put(`/system/manager/update/${data.id}`, data),
  updateStatus: data => request.post('/system/admin/updateStatus', data),
  delete: id => request.delete(`/system/manager/delete/${id}`),
  resetPassword: data => request.post(`/system/manager/initPass/${data.id}`),

  getAllRoles: () => request.get('/system/role/list'),
}
